﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Entities;

namespace Logic
{
    public class DivisionCalculator
    {
        public int CalculatePrice(Division division)
        {
            int totalValue = 0;

            List<AbstractVegetables> vegetables = division.Vegetables;

            foreach (AbstractVegetables vegetable in vegetables)
            {
                totalValue += vegetable.Calorificvalue;
            }
            return totalValue;
        }
    }
}
